@extends('admin')

@section('content')

    <div class="nav">
        <ul class="cc">
            <li class="current">
                <a href="{{url('admin/users/levels')}}">会员等级管理</a>
            </li>
        </ul>
    </div>

    <p class="mb10">
        <a href="{{url('admin/users/updatelevels')}}" class="btn J_dialog" title="新增会员等级"><span class="add"></span>新增会员等级</a>
    </p>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>等级图标</th>
                    <th>等级名称</th>
                    <th>最小消费金额</th>
                    <th>最大消费金额</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($levels as $item)
                    <tr>
                        <td>{{$item->id}}</td>
                        <td><img src="{{url('img/level-'.$item->icon.'/0-50-1')}}" alt=""/></td>
                        <td>{{$item->name}}</td>
                        <td>{{$item->start}}</td>
                        <td>{{$item->end}}</td>
                        <td>
                            <a href="{{url('admin/users/updatelevels/'.$item->id)}}" title="{{$item->name}}的资料" class="mr10 J_dialog">[编辑]</a>
                            <a href="{{url('admin/users/deletelevels/'.$item->id)}}" class="mr10 J_ajax_del">[删除]</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>



    </div>

@stop